package Test;

import GUI.Plot;
import Transformers.Fourier;
import Types.Complex;
import javax.swing.JFrame;
import org.jfree.chart.ChartPanel;

/**
 *
 * @author Cliff Laschet
 */
public class PlotTest {

    public static void main(String[] args) {
        /*DefaultPieDataset data = new DefaultPieDataset();
        data.setValue("Category 1", 43.2);
        data.setValue("Category 2", 27.9);
        data.setValue("Category 3", 79.5);
        
        JFreeChart chart = ChartFactory.createPieChart(
        "Sample Pie Chart",
        data,
        true, // legend?
        true, // tooltips?
        false // URLs?
        );
         */

        Complex[] data = new Complex[20];
        for (int i = 0; i < data.length; i++) {
            data[i] = new Complex(i, 0);
        }
        
        Fourier fourier = new Fourier();
        Complex[] data2 = fourier.complexForward(data);

        ChartPanel panel = new Plot().standardComplexXYPlot(data2, "Test", "Real", "Imaginary");
        JFrame frame = new JFrame();
        frame.add(panel);
        //ChartFrame frame = new ChartFrame("First", chart);
        frame.pack();
        frame.setVisible(true);
    }
}
